package com.lk.lkappearance.controller;

import com.lk.lkappearance.common.AbstractBaseController;
import com.lk.lkappearance.model.AlarmLedger;
import com.lk.lkappearance.model.User;
import com.lk.lkappearance.service.AlarmLedgerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;
@RestController
@RequestMapping("/api/alarm")
public class AlarmLedgerController extends AbstractBaseController {




    @Autowired
    AlarmLedgerService alarmLedgerService;

    /**
     * 得到报警台账列表
     * @param alarmLedger
     * @return
     */

    @ResponseBody
    @PostMapping("/getList")
    public Map<String,Object> getList(@RequestBody AlarmLedger alarmLedger) {
        log.info("查看报警台账");
        return alarmLedgerService.getList(alarmLedger);
    }


    public Map<String,Object> handling(@PathVariable("alarmId") String alarmId) {
        log.info("处置报警");
        return alarmLedgerService.handling(alarmId);



    }






}
